# -*- coding: utf-8 -*-
"""
Created on Tue Apr  9 11:15:56 2019

@author: LENOVO
"""
"""
电话号码属性判断
"""
def JudgeTelephoneAt(telephoneNum):
    CN_mobile = [134,135,136,137,138,139,150,151,152,157,158,159,182,183,184,187,188,147,178,1705]
    CN_union = [130,131,132,155,156,185,186,145,176,1709]
    CN_telecom = [133,153,180,181,189,177,1700]
    
    numData = int(telephoneNum[0:3])
    
    for telNum in CN_mobile:
        if telNum == numData:
            result = True
            print('Operator: China Mobile')
            print("We're sending verification code via text to your phone: ",telephoneNum)
            return
        else:
            result = False 
    for telNum in CN_union:
        if telNum == numData:
            result = True
            print('Operator: China Union')
            print("We're sending verification code via text to your phone: ",telephoneNum)
            return
        else:
            result = False
    for telNum in CN_telecom:
        if telNum == numData:
            result = True
            print('Operator: China Telecom')
            print("We're sending verification code via text to your phone: ",telephoneNum)
            return
        else:
          result = False 
    if result == False:
        print('No such a operator')
        return
    
def CheckTelephoneNum():
    telephoneNum = input('Enter your number:')
    length = len(telephoneNum)
    if length == 11:
        JudgeTelephoneAt(telephoneNum)
    else:
        print('Invalid length, your number should be in 11 digits')

CheckTelephoneNum()